extends ./index.jade

block content
	.rightSide
		.container-fluid
			.row
				form#userForm.form.form-inline
					.form-group.managerOnly
						label(for="schools") 学校
							select#querySchool.form-control(name="schools")
					.form-group
						label.marginLeft 购买时间
						input#userdateStart.datepicker.date.form_datetime.user_date.widthFixed(type='text' placeholder='开始日期' required)
						input#timeStart.datepicker.date.form_datetime.controls.user_time.widthFixed(type='text' placeholder='具体时间' required)
						label 至
						input#userdateEnd.datepicker.date.form_datetime.controls.user_date.widthFixed(type='text' placeholder='结束日期' required)
						input#timeEnd.datepicker.date.form_datetime.controls.user_time.widthFixed(type='text' placeholder='具体时间' required)
					.form-group
						.input-group
							.input-group-btn
								button.btn.btn-default.dropdown-toggle.marginLeft#buyer(type="button" data-toggle="dropdown" aria-expanded="true" aria-haspopup="true") 收货人姓名
									span.caret
								ul.dropdown-menu
									li(onclick="myFun.chooseInfo(this)")
										a 收货人姓名
									li(onclick="myFun.chooseInfo(this)")
										a 收货人电话
							input#buyerInfo.form-control.widthFixed(type="text")
					.form-group
						button.btn.btn-primary.marginLeft(type='submit') 查询
				#tips.text-danger
			.row#userInfo
				.row
					table#tableUser.table.table-bordered.table-hover.center
						thead
							tr
								th 姓名
								th 电话
								th 地址
								th 购买次数
								th 付款金额
								th 购买天数
								th 用户属性
						tbody#users
				.row.text-right.forcedVerticalCenter
					span 
						|共
						span#total
						|条记录
					#paginator.paginator
				


	link(rel='stylesheet' href='/css/lib/bootstrap-datetimepicker.css')
	link(rel='stylesheet' href='/css/lib/select2.min.css')
	script#template_school(type='text/dot-tpl')
		|{{~it:value:index}}
		option(value='{{=value.id}}') {{=value.name}}
		|{{~}}
	script#template_user(type='text/dot-tpl')
		|{{~it:value:index}}
		tr(id='{{=value.user_id}}')
			td {{=value.nick}}
			td {{=value.phone}}
			td {{=value.province + value.city + value.area}}
			td {{=value.buy_count}}
			td {{=value.total_payment}}
			td {{=value.buy_days}}
			|{{? !value.new_user}}
			td 老用户
			|{{??}}
			td 新用户
			|{{?}}
		|{{~}}


	script(src="/js/lib/require.js" data-main="/js/user_query")